import request from '@/utils/request'
const apiName = '/admin/hosp/hospitalSet'
export default {
    //带条件的分页查询
    PageList(page, limit, searchObj) {
        return request({
            url: `${apiName}/${page}/${limit}`,
            method: 'get',
            params: searchObj
        })
    },
    //根据ID删除医院设置
    removeById(id) {
        return request({
            url: `${apiName}/${id}`,
            method: `delete`
        })
    },
    save(hospset) {
        return request({
            url: `${apiName}/saveHospSet`,
            method: 'post',
            data: hospset
        })
    },
    getById(id) {
        return request({
            url: `${apiName}/getHospSet/${id}`,
            method: 'get'
        })
    },
    updateById(hospset) {
        return request({
            url: `${apiName}/updateHospSet`,
            method: 'put',
            data: hospset
        })
    },
    removeRows(idList) {
        return request({
            url: `${apiName}/batchRemove`,
            method: 'delete',
            data: idList
        })
    },
    //锁定和取消锁定
    lockHospSet(id, status) {
        return request({
            url: `${apiName}/lockHospitalSet/${id}/${status}`,
            method: 'put'
        })
    },

}